<div class="card-box">
    <!-- Row start -->
    <div class="am-g">
        <div class="am-u-sm-12 am-u-md-6">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <a class="am-btn am-btn-default" href="/personnel/add"><span class="am-icon-plus"></span> 新增</a>
                    <!--<a class="am-btn am-btn-default"><span class="am-icon-archive"></span> 审核</a>
                    <a class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</a>-->
                </div>
            </div>
        </div>

        <div class="am-u-sm-12 am-u-md-3">
            <div class="am-input-group am-input-group-sm">
                <input type="text" class="am-form-field">
                <span class="am-input-group-btn">
				            <button class="am-btn am-btn-default" type="button">搜索</button>
				          </span>
            </div>
        </div>
    </div>
    <!-- Row end -->

    <!-- Row start -->
    <div class="am-g">
        <div class="am-u-sm-12">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                        <tr>
                            <th class="table-title">姓名</th>
                            <th class="table-date am-hide-sm-only">工号</th>
                            <th class="table-date am-hide-sm-only">性别</th>
                            <th class="table-author am-hide-sm-only">电话</th>                            
                            <th class="table-type">邮箱</th>
                            <th class="table-type">QQ</th>
                            <th class="table-author am-hide-sm-only">证件类型</th>
                            <th class="table-author am-hide-sm-only">证件编号</th>
                            <th class="table-author am-hide-sm-only">工作性质</th>
                            <th class="table-author am-hide-sm-only">状态</th>
                            <th class="table-date am-hide-sm-only">试用期限</th>
                            <th class="table-date am-hide-sm-only">入职时间</th>
                            <th class="table-date am-hide-sm-only">工作地点</th>
                            <th class="table-date am-hide-sm-only">部门</th>
                            <th class="table-date am-hide-sm-only">岗位</th>
                            <th class="table-set">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{range .List}}
                        <tr>
                            <td>{{.Uname}}</td>
                            <td>{{.Wcode}}</td>
                            <td>{{.Sex}}</td>
                            <td>{{.Phone}}</td>
                            <td>{{.Email}}</td>
                            <td>{{.Wqq}}</td>
                            <td>{{.Icodety}}</td>
                            <td>{{.Icodenum}}</td>
                            <td>{{.Wtype}}</td>
                            <td>{{.Wstatus}}</td>
                            <td>{{.Extetime}}</td>
                            <td>{{.Paddtime}}</td>
                            <td>{{.Waddress}}</td>
                            <td>{{.Department}}</td>
                            <td>{{.Posts}}</td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a href="/personnel/edite?id={{.Id}}" class="am-btn am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        {{end}}
                    </tbody>
                </table>
                {{str2html .page}}
                <hr />
                <p>注：<span style="color:red">请删除用户之前进行确认</span></p>
        </div>

    </div>
    <!-- Row end -->

</div>
</div>
</div>

<script>
         //删除
        $(".delete-id").click(function () {
            if (confirm("确定删除当前用户？")) {
                var id = $(this).attr("id")
                $.get("/clients/delete", { id: id}, function (data) {
                    if (data.status == 1) {
                        alert(data.msg)
                        window.location.reload()
                    } else {
                        alert(data.msg)
                    }
                },"json")
            }
        });


</script>